package com.kongjs.application.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Getter
@Setter
@ToString
@TableName("login_log")
@Entity
public class LoginLog implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @TableField("login_message")
    private String loginMessage;

    @TableField("login_exception")
    private String loginException;

    @TableField("login_result")
    private String loginResult;

    @TableField("login_time")
    private LocalDateTime loginTime;

    @TableField("login_type")
    private String loginType;

    @TableField("login_ipaddr")
    private String loginIpaddr;

    @TableField("login_ipinfo")
    private String loginIpinfo;

    @TableField("execution_time")
    private Long executionTime;

    @TableField("tenant_id")
    private Long tenantId;

    @TableField("user_id")
    private Long userId;

    @TableField("user_name")
    private String userName;

    @TableField("platform")
    private String platform;

    @TableField("browser")
    private String browser;
}
